

#include "draw.h"


//ST7920内嵌了4个16×16的软件可编程的CGRAM
//能存储4个用户自定义字符的字模（16×16点阵），大小1K位。
//字符编码使用两个字节表示,分别为：0000h,0002h,0004h,0006h
//自定义字符写入CGRAM,不能断电保存
void LCD_Write_USR_CGRAM()
{   
  //前三个user char的首地址0x40,0x50,0x60,0x70
  for(u8 j=0;j<4;j++)  
  {
  		LCD_WriteCMD(0x40+j*16);		
		 for(u8 i=0;i<16;i++)			//心形
		 {
			 LCD_WriteDATA(usr_char[i*2+j*32]);
			 LCD_WriteDATA(usr_char[i*2+1+j*32]);
		 }

  }
  
}


  

/******************************************************************** 
* 名称 : LCD_DISP_USR_Char 
* 功能 : 在当前坐标位置显示单个字符
* 输入 : 显示的位置,cgram 中字符索引 index=1,2,3,4
* 说明: //在使用该函数前，确保已执行LCD_Write_USR_CGRAM()
//显示自定义的字符,并把这个字符填满16*16
***********************************************************************/ 

void LCD_DISP_USR_Char(u8 row, u8 col,u8 index)
{

  LCD_SetPos(row, col);   //cgram char 映射输出的DDRAM地址
  LCD_WriteDATA(0x00);	//Must exist!
  LCD_WriteDATA( (index-1)*2);	// cgram :00,02,04,06  第index个字符存储地址偏移量
 
}


/*
From Datasheet:由扩充指令设置 GDRAM地址先垂直地址后水平地址（连续 2 个字节的数据
来定义垂直和水平地址），再2个字节的数据给绘图 RAM（先高 8位后低 8位）
*/
// 显示128*64点阵图像
// 从基本指令集切换到扩展指令集，一定要先清屏：LCD_Clear_GDRAM();否则会重叠显示 
// 从扩展指令集切换到基本指令集，一定要先1.LCD_WriteCMD(0x30);  //绘图显示关，基本指令集
 //2.delay_us(370); //delay is important!;否则字符不会显示出来
void LCD_Disp_Image(const u8 *str)
{
   u16 i,j;
   
   LCD_WriteCMD(0x36);	//绘图显示开，扩充指令集extended instruction(DL=8BITS,RE=1,G=1)
   delay_us(370);		  //delay is important!
   
//*******显示上半屏内容  
   for(i=0;i<32;i++)              //20H
    { 
      LCD_WriteCMD(0x80 + i);   //SET  垂直地址 VERTICAL ADD
      LCD_WriteCMD(0x80);       //SET  水平地址 HORIZONTAL ADD
      for(j=0;j<16;j++)
       {
        LCD_WriteDATA(*str++);     
       }
    }

//*******显示下半屏内容
   for(i=0;i<32;i++)        
    {
      LCD_WriteCMD(0x80 + i); //SET 垂直地址 VERTICAL ADD
      LCD_WriteCMD(0x88);     //SET 水平地址 HORIZONTAL ADD
      for(j=0;j<16;j++)
       {
         LCD_WriteDATA(*str++);
       }
    }
  
}

// col+1, 水平移动16dot
void LCD_Disp_Large_Num2432(const u8 *Font,u8 col,u8 Num)
{
   u16 i,j;
   LCD_WriteCMD(0x36);  //绘图显示开，扩充指令集extended instruction(DL=8BITS,RE=1,G=1)
   delay_us(370);        //delay is important!

    for(i=0;i<32;i++)              //20H
    { 
      LCD_WriteCMD(0x80 + i);   //SET  垂直地址 VERTICAL ADD //往下移动
      LCD_WriteCMD(0x80+ col);   //SET 水平地址 HORIZONTAL ADD,防止自动加1
      for(j=0;j<3;j++)
       {
        LCD_WriteDATA(*(Num*96+Font++));     
       }
    }    
}

// col+1, 水平移动16dot
void LCD_Disp_Large_Num1632(const u8 *Font,u8 col,u8 Num,bool reverse)
{
   u16 i,j;
   LCD_WriteCMD(0x36);  //绘图显示开，扩充指令集extended instruction(DL=8BITS,RE=1,G=1)
   delay_us(370);        //delay is important!

    for(i=0;i<32;i++)              //20H
    { 
      LCD_WriteCMD(0x80 + i);   //SET  垂直地址 VERTICAL ADD //往下移动
      LCD_WriteCMD(0x80+ col);   //SET 水平地址 HORIZONTAL ADD,防止自动加1
      for(j=0;j<2;j++)
       {
         if(reverse)
            LCD_WriteDATA(~*(Num*64+Font++)); 
        else
        {
            LCD_WriteDATA(*(Num*64+Font++)); 
        }
       }
    }    
}


unsigned char const usr_char[]=

{

/*-- user char :heart.bmp  --*/

/*--  宽度x高度=16x16  --*/

0x00,0x00,0x00,0x00,0x0C,0xFC,0x3F,0xBE,0x3F,0x7E,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,
0x7F,0xFE,0x3F,0xFE,0x1F,0xFC,0x0F,0xF0,0x07,0xE0,0x07,0x80,0x03,0x00,0x00,0x00, // heart

0x00,0x00,0x70,0x0E,0x7F,0xFE,0x3C,0x3C,0x38,0x1C,0x71,0x0E,0x61,0x06,0x61,0x06,
0x61,0x06,0x71,0xCE,0x38,0x1C,0x1C,0x38,0x0F,0xF0,0x1C,0x38,0x3C,0x3C,0x00,0x00, //clock


0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x03,
0xFF,0xF0,0x07,0xFF,0xF8,0x0F,0x80,0xF8,0x0F,0x00,0x7C,0x1E,0x00,0x3C,0x1E,0x00,

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x03,
0xFF,0xF0,0x07,0xFF,0xF8,0x0F,0x80,0xF8,0x0F,0x00,0x7C,0x1E,0x00,0x3C,0x1E,0x00

}; 

//电池图标16*08
const unsigned char icon_Battery[]=
{
  0x18,0x7E,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x7E,0x00,//电池放空
  0x18,0x7E,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x42,0x7E,0x7E,0x7E,0x7E,0x7E,0x00,//剩余1/3
  0x18,0x7E,0x42,0x42,0x42,0x42,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x00,//剩余2/3
  0x18,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x7E,0x00,//电池满格
};


/**********PCTolCD2002 @ 阴码，顺向，逐行式************************************/
const unsigned char  Logo[]=
{          //  Hellokitty
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF8,0x00,0x7F,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x1F,0xFC,0x03,0xFF,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x1F,0xF8,0x00,0x00,0x00,0x3F,0xFE,0x5F,0xFF,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0xBF,0xFE,0x02,0x00,0x00,0x7C,0x1F,0x3F,0xFF,0xC0,0x00,0x00,0x00,
0x00,0x00,0x00,0x7F,0xFF,0xC0,0x00,0x00,0xF8,0x07,0xFF,0xE3,0xF0,0x00,0x00,0x00,
0x00,0x00,0x04,0xFF,0xFF,0xF8,0x7F,0xFF,0xE4,0x13,0xFF,0x01,0xE0,0x00,0x00,0x00,
0x00,0x00,0x01,0xF0,0x1F,0xFF,0xFF,0xFF,0xE0,0x21,0xF8,0x08,0xF0,0x00,0x00,0x00,
0x00,0x00,0x23,0xE0,0x03,0xFF,0xFF,0xFF,0xC0,0x01,0xE0,0x10,0xF1,0x00,0x00,0x00,
0x00,0x00,0x81,0xE2,0x00,0x7F,0xFF,0xFF,0x81,0x04,0xEA,0x00,0xF0,0x00,0x00,0x00,
0x00,0x00,0x03,0xE0,0x00,0x1F,0xF0,0x03,0x94,0x78,0xE4,0x00,0xF1,0x00,0x00,0x00,
0x00,0x00,0x03,0xE0,0x00,0x00,0x00,0x07,0x01,0xFF,0xFE,0x40,0x78,0x08,0x00,0x00,
0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x07,0x03,0xFF,0xFF,0x05,0xFA,0x00,0x00,0x00,
0x00,0x00,0x13,0xC4,0x00,0x00,0x00,0x0F,0x23,0xCF,0xFF,0xBF,0xFC,0x40,0x00,0x00,
0x00,0x00,0x03,0xC0,0x00,0x00,0x01,0x0E,0x03,0x9F,0x07,0xFF,0xFF,0x00,0x00,0x00,
0x00,0x00,0x23,0xC0,0x00,0x50,0x40,0x0E,0x03,0x9E,0x01,0xFF,0xFF,0x91,0x00,0x00,
0x00,0x00,0x0B,0xC1,0x00,0x00,0x00,0x5E,0x0B,0xF8,0x00,0xE0,0x07,0x80,0x00,0x00,
0x00,0x00,0x43,0xC0,0x00,0x00,0x00,0x0E,0x03,0xF8,0x20,0xF0,0x03,0x80,0x00,0x00,
0x00,0x00,0x13,0xF8,0x00,0x00,0x00,0x0E,0x89,0xF8,0x88,0xFE,0x03,0x80,0x00,0x00,
0x00,0x00,0x01,0xF8,0x00,0x00,0x00,0x2F,0x20,0x7A,0x00,0x7E,0x03,0x80,0x00,0x00,
0x00,0x00,0x01,0xF9,0x00,0x00,0x00,0x07,0x92,0x38,0x20,0xFF,0x03,0x84,0x00,0x00,
0x00,0x00,0x05,0xF4,0x00,0x00,0x00,0x43,0xC0,0xFC,0x08,0xE7,0x17,0xA0,0x00,0x00,
0x00,0x00,0x01,0xF0,0x00,0x00,0x00,0x03,0xFF,0xFE,0x03,0xE7,0x07,0x01,0x00,0x00,
0x00,0x00,0x23,0xE5,0x00,0x00,0x00,0x09,0xFF,0xFF,0xCF,0xFF,0x47,0x00,0x00,0x00,
0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0xA0,0x3F,0x87,0xFF,0xFE,0x0F,0x04,0x00,0x00,
0x00,0x00,0x0B,0xC0,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0x7C,0x1E,0x00,0x00,0x00,
0x00,0x00,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x1C,0x00,0x00,0x00,
0x00,0x00,0x27,0x81,0x00,0x00,0x00,0x00,0x00,0x08,0x07,0x84,0x3C,0x00,0x00,0x00,
0x00,0x00,0x0F,0x08,0x00,0x00,0x00,0x00,0x00,0x40,0x03,0xC0,0xFC,0x00,0x00,0x00,
0x00,0x00,0x8F,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFB,0xFC,0x00,0x00,0x00,
0x00,0x00,0x1F,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x48,0xFF,0xFD,0x00,0x00,0x00,
0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x7F,0x9E,0x00,0x00,0x00,
0x00,0x00,0x1E,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40,0x0D,0x1E,0x00,0x00,0x00,
0x00,0x00,0x1F,0x22,0x24,0x10,0x00,0x00,0x00,0x00,0x10,0x00,0x1E,0x10,0x40,0x00,
0x00,0x21,0x3E,0x48,0x02,0x44,0x00,0x00,0x00,0x00,0x82,0x10,0x1E,0x01,0x08,0x00,
0x00,0x08,0x1E,0x00,0x44,0x11,0x00,0x00,0x00,0x82,0x08,0x02,0x8F,0xFC,0x00,0x00,
0x00,0x00,0x1C,0x10,0x11,0x00,0x00,0x00,0x00,0x10,0x20,0x08,0xFF,0xFF,0x85,0x00,
0x00,0x81,0xFE,0x04,0x80,0x22,0x00,0x00,0x00,0x00,0x00,0x03,0xFF,0xFF,0xC0,0x00,
0x00,0x3F,0xFF,0xF0,0x29,0x80,0x00,0x00,0x00,0x84,0x41,0x03,0xFF,0xFF,0x80,0x00,
0x00,0x3F,0xFF,0xF8,0x03,0xE4,0x00,0x00,0x00,0x21,0xF4,0x81,0xCF,0x00,0x10,0x00,
0x00,0xBF,0xFF,0xF0,0x47,0xF0,0x00,0x00,0x00,0x0B,0xF8,0x00,0x0F,0x00,0x00,0x00,
0x00,0x08,0x1E,0x04,0x07,0xF0,0x00,0x62,0xA2,0x03,0xF8,0x00,0x1E,0x04,0x00,0x00,
0x00,0x00,0x1E,0x00,0x0F,0xF0,0x00,0x00,0x08,0x13,0xF8,0x00,0x1E,0x00,0x00,0x00,
0x00,0x04,0x0E,0x4A,0x87,0xF6,0x00,0x81,0x00,0x03,0xF8,0x00,0x7E,0x42,0x00,0x00,
0x00,0x00,0x0F,0x00,0x07,0xE0,0x00,0x00,0x20,0x4B,0xFA,0x00,0xFF,0xF0,0x00,0x00,
0x00,0x00,0x9F,0xF0,0x4B,0xE8,0x00,0x1F,0x84,0x01,0xF0,0x00,0xFF,0xFC,0x00,0x00,
0x00,0x04,0x3F,0xF8,0x03,0xC1,0x00,0x7F,0xC0,0x84,0xE1,0x00,0x7F,0xFE,0x00,0x00,
0x00,0x11,0xFF,0xF4,0x00,0x10,0x00,0xFF,0xE0,0x00,0x04,0x00,0x3C,0x7D,0x00,0x00,
0x00,0x03,0xFF,0x80,0x48,0x24,0x00,0xE0,0xE0,0x20,0x00,0x00,0x78,0x04,0x00,0x00,
0x00,0x03,0xE7,0xC0,0x01,0x00,0x00,0x7F,0xE8,0x00,0x00,0x00,0x7C,0x00,0x00,0x00,
0x00,0x41,0x09,0xE1,0x00,0x00,0x00,0x7F,0xC2,0x00,0x00,0x8F,0xF9,0x22,0x00,0x00,
0x00,0x00,0x21,0xFF,0x90,0x00,0x00,0x3F,0x90,0x00,0x00,0x0F,0xF0,0x80,0x00,0x00,
0x00,0x04,0x02,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x4F,0xFE,0x30,0x00,0x00,
0x00,0x00,0x08,0xFF,0xA2,0x00,0x00,0x00,0x42,0x00,0x00,0x13,0xFF,0x80,0x00,0x00,
0x00,0x00,0x43,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0xE1,0x00,0x00,
0x00,0x40,0x0F,0xFF,0xC0,0x00,0x00,0x40,0x04,0x00,0x00,0x1F,0x8F,0xE0,0x00,0x00,
0x00,0x08,0x3F,0x8F,0xE2,0x00,0x00,0x12,0x10,0x00,0x00,0x7F,0x03,0xE0,0x00,0x00,
0x00,0x00,0x3E,0x03,0xFC,0x01,0x08,0x00,0x00,0x09,0x21,0xFE,0x00,0x00,0x00,0x00,
0x00,0x00,0x7C,0x41,0xFF,0x08,0x42,0x00,0x00,0x40,0x07,0xFD,0x00,0x08,0x00,0x00,
0x00,0x00,0x30,0x08,0x7F,0xF0,0x00,0x00,0x00,0x00,0x7F,0xF0,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x80,0x1F,0xFF,0x80,0x00,0x92,0x4F,0xFF,0xC0,0x00,0x00,0x00,0x00,
0x00,0x00,0x02,0x00,0x07,0xFF,0xFF,0xD0,0x07,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,
0x00,0x00,0x40,0x00,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFE,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x08,0x40,0x20,0x1F,0xFF,0xFF,0xFF,0xFF,0xE0,0x49,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x09,0x00,0x00,0x7F,0xFF,0xFF,0xFC,0x00,0x00,0x00,0x80,0x00,0x00,
/*"C:\Users\casy\Desktop\KT.bmp",0*/
};

//const u8  digitalFont_16x32[10][64]
/*=====================显示模式3数字图片（宽度x高度=16*32）=========================*/
const u8  digitalFont_16x32[]=  //阴码，顺向，逐行式 C51 十六进制，对应英文点阵 16×32
// 0(0) 1(1) 2(2) 3(3) 4(4) 5(5) 6(6) 7(7) 8(8) 9(9) 10(:) 11( )
{
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x0F,0xF8,0x1F,0xFC,0x1E,0x3C,
0x3C,0x1E,0x38,0x0E,0x38,0x0E,0x70,0x07,0x70,0x07,0x70,0x07,0x70,0x07,0x70,0x07,
0x70,0x07,0x70,0x07,0x70,0x07,0x70,0x07,0x38,0x0E,0x38,0x0E,0x3C,0x1E,0x1E,0x3C,
0x1F,0xFC,0x0F,0xF8,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"0",0*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xC0,0x3F,0xC0,0x3F,0xC0,0x01,0xC0,
0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,
0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,0x01,0xC0,
0x3F,0xFE,0x7F,0xFF,0x3F,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"1",1*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xE0,0x1F,0xF8,0x3F,0xFC,0x38,0x3C,
0x70,0x1E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x00,0x1E,0x00,0x1C,0x00,0x3C,
0x00,0x78,0x00,0xF0,0x01,0xE0,0x07,0xC0,0x0F,0x86,0x1F,0x0F,0x3F,0x87,0x7F,0xE7,
0x70,0xFF,0x70,0x7F,0x70,0x3E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"2",2*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFF,0x3F,0xFF,0x3F,0xFF,0x38,0x0E,
0x38,0x1C,0x38,0x3C,0x30,0x38,0x00,0x78,0x00,0x70,0x00,0xE0,0x07,0xF8,0x07,0xFC,
0x07,0xFE,0x00,0x1F,0x00,0x0F,0x00,0x07,0x70,0x07,0x70,0x07,0x70,0x0F,0x78,0x1E,
0x3F,0xFC,0x1F,0xF8,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"3",3*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x78,0x00,0xF8,0x00,0xF8,
0x01,0xF8,0x03,0xF8,0x03,0xB8,0x07,0x38,0x07,0x38,0x0E,0x38,0x1C,0x38,0x1C,0x38,
0x38,0x38,0x78,0x38,0x7F,0xFF,0x7F,0xFF,0x7F,0xFF,0x00,0x38,0x00,0x38,0x00,0x38,
0x07,0xFF,0x07,0xFF,0x07,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"4",4*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFE,0x3F,0xFE,0x3F,0xFE,0x38,0x0E,
0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x00,0x38,0x00,0x3B,0xE0,0x3F,0xF8,0x3F,0xFC,
0x38,0x3C,0x30,0x1E,0x00,0x0E,0x00,0x0E,0x20,0x0E,0x70,0x0E,0x70,0x1E,0x78,0x3C,
0x3F,0xF8,0x1F,0xF0,0x0F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"5",5*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xF8,0x07,0xFE,0x0F,0xFE,0x1F,0x0F,
0x1E,0x07,0x3C,0x07,0x3C,0x00,0x38,0x00,0x78,0x00,0x7B,0xF0,0x7F,0xF8,0x7F,0xFC,
0x7C,0x3E,0x78,0x1E,0x70,0x0E,0x70,0x0E,0x70,0x0E,0x78,0x0E,0x38,0x1E,0x3C,0x1C,
0x1F,0xFC,0x1F,0xF8,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"6",6*/

0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,0x7F,0xEF,0x7F,0xFF,0x7F,0xFE,0x70,0x1E,
0x70,0x1C,0x70,0x1C,0x70,0x38,0x70,0x38,0x00,0x70,0x00,0x70,0x00,0xE0,0x00,0xE0,
0x01,0xC0,0x01,0xC0,0x01,0xC0,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,0x03,0x80,
0x03,0x80,0x07,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"7",7*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF0,0x0F,0xF8,0x1F,0xFC,0x3C,0x1E,
0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x1C,0x1C,0x0F,0xF8,0x1F,0xFC,
0x3F,0xFE,0x3C,0x1E,0x78,0x0F,0x70,0x07,0x70,0x07,0x70,0x07,0x78,0x0F,0x3C,0x1E,
0x3F,0xFE,0x1F,0xFC,0x07,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"8",8*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x0F,0xF8,0x1F,0xFC,0x1C,0x3C,
0x3C,0x1C,0x38,0x1E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x38,0x0E,0x3C,0x1E,0x1C,0x3E,
0x1F,0xFE,0x0F,0xFE,0x03,0xCE,0x00,0x0E,0x00,0x1C,0x38,0x1C,0x38,0x3C,0x3C,0x78,
0x1F,0xF0,0x1F,0xE0,0x07,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"9",9*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x03,0x80,0x07,0xC0,0x07,0xC0,0x03,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x80,0x07,0xC0,0x07,0xC0,0x03,0x80,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*":",10*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*" ",11*/

};


/*=====================显示模式3数字图片（宽度x高度=24*32）=========================*/
const u8  digitalFont2_24x32[10][96]={   //阴码，顺向，逐行式 C51 十六进制，对应英文点阵 24×32

//0(0) 1(1) 2(2) 3(3) 4(4) 5(5) 6(6) 7(7) 8(8) 9(9)

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x80,0x01,
0xFF,0xE0,0x03,0xFF,0xF0,0x07,0xC0,0xF8,0x0F,0x80,0x7C,0x1F,0x00,0x3E,0x1E,0x00,
0x1E,0x1E,0x00,0x1E,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,
0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x1E,0x00,0x1E,0x1E,0x00,0x1E,0x1F,
0x00,0x3E,0x0F,0x80,0x7C,0x07,0xC0,0xF8,0x03,0xFF,0xF0,0x01,0xFF,0xE0,0x00,0x7F,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"0",0*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFE,0x00,0x1F,
0xFE,0x00,0x1F,0xFE,0x00,0x00,0x3E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,
0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,
0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,
0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x1F,0xFF,0xFE,0x3F,0xFF,0xFE,0x1F,0xFF,
0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"1",1*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x07,
0xFF,0xE0,0x0F,0xFF,0xF8,0x1F,0x00,0xF8,0x3C,0x00,0x7C,0x3C,0x00,0x3C,0x3C,0x00,
0x3C,0x3C,0x00,0x3C,0x1C,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xF0,
0x00,0x03,0xC0,0x00,0x0F,0x80,0x00,0x3F,0x00,0x00,0xFC,0x00,0x03,0xF0,0x0C,0x0F,
0xF8,0x1F,0x1F,0xFF,0x0F,0x3F,0xFF,0x8F,0x3C,0x1F,0xFF,0x3C,0x07,0xFE,0x3C,0x01,
0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"2",2*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0x0F,
0xFF,0xFF,0x0F,0xFF,0xFE,0x0F,0x00,0x3E,0x0F,0x00,0x7C,0x0F,0x00,0xF8,0x06,0x01,
0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0xFF,0xF0,0x00,0xFF,0xFC,
0x00,0xFF,0xFE,0x00,0x00,0x7F,0x00,0x00,0x1F,0x00,0x00,0x0F,0x3C,0x00,0x0F,0x3C,
0x00,0x0F,0x3C,0x00,0x1E,0x1F,0x00,0x7E,0x1F,0xFF,0xFC,0x07,0xFF,0xF0,0x01,0xFF,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"3",3*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x00,
0x07,0xE0,0x00,0x07,0xE0,0x00,0x0F,0xE0,0x00,0x1F,0xE0,0x00,0x3F,0xE0,0x00,0x7D,
0xE0,0x00,0xF9,0xE0,0x01,0xF1,0xE0,0x03,0xE1,0xE0,0x07,0xC1,0xE0,0x0F,0x81,0xE0,
0x1F,0x01,0xE0,0x3E,0x01,0xE0,0x7F,0xFF,0xFF,0x7F,0xFF,0xFF,0x3F,0xFF,0xFF,0x00,
0x01,0xE0,0x00,0x01,0xE0,0x00,0x01,0xE0,0x00,0x7F,0xFF,0x00,0x7F,0xFF,0x00,0x7F,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"4",4*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFC,0x0F,
0xFF,0xFC,0x0F,0xFF,0xFC,0x0F,0x00,0x3C,0x0F,0x00,0x3C,0x0F,0x00,0x3C,0x0F,0x00,
0x3C,0x0F,0x00,0x00,0x0F,0x00,0x00,0x0F,0x3F,0xC0,0x0F,0xFF,0xF0,0x0F,0xFF,0xFC,
0x0F,0x80,0x7E,0x06,0x00,0x1F,0x00,0x00,0x0F,0x00,0x00,0x0F,0x18,0x00,0x0F,0x3C,
0x00,0x1F,0x3C,0x00,0x3E,0x3F,0x00,0xFE,0x1F,0xFF,0xFC,0x07,0xFF,0xF0,0x01,0xFF,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"5",5*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF0,0x00,
0xFF,0xFC,0x01,0xFF,0xFE,0x07,0xF8,0x1F,0x07,0xE0,0x0F,0x0F,0xC0,0x0E,0x1F,0x80,
0x00,0x1F,0x00,0x00,0x1F,0x00,0x00,0x3F,0x3F,0xC0,0x3F,0xFF,0xF8,0x3F,0xFF,0xFC,
0x3F,0x80,0x7E,0x3E,0x00,0x1F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x1E,
0x00,0x0F,0x1F,0x00,0x1E,0x0F,0xC0,0x7E,0x07,0xFF,0xFC,0x03,0xFF,0xF8,0x00,0x7F,
0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"6",6*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x3F,0xFF,0x9E,0x3F,
0xFF,0xFF,0x3F,0xFF,0xFE,0x3C,0x00,0xFC,0x3C,0x00,0x7C,0x3C,0x00,0xF8,0x3C,0x01,
0xF0,0x3C,0x03,0xE0,0x00,0x03,0xC0,0x00,0x07,0xC0,0x00,0x0F,0x80,0x00,0x0F,0x00,
0x00,0x1E,0x00,0x00,0x3E,0x00,0x00,0x3C,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00,
0x78,0x00,0x00,0x78,0x00,0x00,0xF8,0x00,0x00,0xF8,0x00,0x00,0xF8,0x00,0x00,0x78,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"7",7*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xC0,0x03,
0xFF,0xF0,0x0F,0xFF,0xFC,0x0F,0x80,0x7C,0x1F,0x00,0x3E,0x1E,0x00,0x1E,0x1E,0x00,
0x1E,0x1E,0x00,0x1E,0x0F,0x00,0x3C,0x0F,0x80,0x7C,0x03,0xFF,0xF0,0x07,0xFF,0xF8,
0x0F,0xFF,0xFC,0x1F,0x80,0x7E,0x3E,0x00,0x1F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,
0x00,0x0F,0x3E,0x00,0x1F,0x1F,0x80,0x7E,0x0F,0xFF,0xFC,0x07,0xFF,0xF8,0x00,0xFF,
0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"8",8*/

{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x03,
0xFF,0xF0,0x07,0xFF,0xF8,0x0F,0x80,0xF8,0x0F,0x00,0x7C,0x1E,0x00,0x3C,0x1E,0x00,
0x3E,0x1E,0x00,0x1E,0x1E,0x00,0x1E,0x1E,0x00,0x1E,0x1F,0x00,0x3E,0x0F,0x80,0xFE,
0x07,0xFF,0xFE,0x03,0xFF,0xFE,0x00,0x7F,0x9E,0x00,0x00,0x3C,0x00,0x00,0x3C,0x1E,
0x00,0x7C,0x1E,0x00,0xF8,0x1F,0x03,0xF0,0x0F,0xFF,0xE0,0x07,0xFF,0xC0,0x01,0xFE,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"9",9*/

};

//阴码，顺向，逐行式 C51 十六进制，对应英文点阵 24×32,Gungsuh Font
const unsigned char  digitalFont1_24x32[]=
{   
 //0(0) 1(1) 2(2) 3(3) 4(4) 5(5) 6(6) 7(7) 8(8) 9(9)

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7F,0x80,0x01,
0xFF,0xE0,0x03,0xFF,0xF0,0x07,0xC0,0xF8,0x0F,0x80,0x7C,0x1F,0x00,0x3E,0x1E,0x00,
0x1E,0x1E,0x00,0x1E,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,
0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x1E,0x00,0x1E,0x1E,0x00,0x1E,0x1F,
0x00,0x3E,0x0F,0x80,0x7C,0x07,0xC0,0xF8,0x03,0xFF,0xF0,0x01,0xFF,0xE0,0x00,0x7F,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"0",0*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFE,0x00,0x1F,
0xFE,0x00,0x1F,0xFE,0x00,0x00,0x3E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,
0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,
0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x00,
0x1E,0x00,0x00,0x1E,0x00,0x00,0x1E,0x00,0x1F,0xFF,0xFE,0x3F,0xFF,0xFE,0x1F,0xFF,
0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"1",1*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x07,
0xFF,0xE0,0x0F,0xFF,0xF8,0x1F,0x00,0xF8,0x3C,0x00,0x7C,0x3C,0x00,0x3C,0x3C,0x00,
0x3C,0x3C,0x00,0x3C,0x1C,0x00,0x3C,0x00,0x00,0x78,0x00,0x00,0xF0,0x00,0x01,0xF0,
0x00,0x03,0xC0,0x00,0x0F,0x80,0x00,0x3F,0x00,0x00,0xFC,0x00,0x03,0xF0,0x0C,0x0F,
0xF8,0x1F,0x1F,0xFF,0x0F,0x3F,0xFF,0x8F,0x3C,0x1F,0xFF,0x3C,0x07,0xFE,0x3C,0x01,
0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"2",2*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0x0F,
0xFF,0xFF,0x0F,0xFF,0xFE,0x0F,0x00,0x3E,0x0F,0x00,0x7C,0x0F,0x00,0xF8,0x06,0x01,
0xF0,0x00,0x01,0xE0,0x00,0x03,0xC0,0x00,0x07,0x80,0x00,0xFF,0xF0,0x00,0xFF,0xFC,
0x00,0xFF,0xFE,0x00,0x00,0x7F,0x00,0x00,0x1F,0x00,0x00,0x0F,0x3C,0x00,0x0F,0x3C,
0x00,0x0F,0x3C,0x00,0x1E,0x1F,0x00,0x7E,0x1F,0xFF,0xFC,0x07,0xFF,0xF0,0x01,0xFF,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"3",3*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xE0,0x00,
0x07,0xE0,0x00,0x07,0xE0,0x00,0x0F,0xE0,0x00,0x1F,0xE0,0x00,0x3F,0xE0,0x00,0x7D,
0xE0,0x00,0xF9,0xE0,0x01,0xF1,0xE0,0x03,0xE1,0xE0,0x07,0xC1,0xE0,0x0F,0x81,0xE0,
0x1F,0x01,0xE0,0x3E,0x01,0xE0,0x7F,0xFF,0xFF,0x7F,0xFF,0xFF,0x3F,0xFF,0xFF,0x00,
0x01,0xE0,0x00,0x01,0xE0,0x00,0x01,0xE0,0x00,0x7F,0xFF,0x00,0x7F,0xFF,0x00,0x7F,
0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"4",4*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFC,0x0F,
0xFF,0xFC,0x0F,0xFF,0xFC,0x0F,0x00,0x3C,0x0F,0x00,0x3C,0x0F,0x00,0x3C,0x0F,0x00,
0x3C,0x0F,0x00,0x00,0x0F,0x00,0x00,0x0F,0x3F,0xC0,0x0F,0xFF,0xF0,0x0F,0xFF,0xFC,
0x0F,0x80,0x7E,0x06,0x00,0x1F,0x00,0x00,0x0F,0x00,0x00,0x0F,0x18,0x00,0x0F,0x3C,
0x00,0x1F,0x3C,0x00,0x3E,0x3F,0x00,0xFE,0x1F,0xFF,0xFC,0x07,0xFF,0xF0,0x01,0xFF,
0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"5",5*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xF0,0x00,
0xFF,0xFC,0x01,0xFF,0xFE,0x07,0xF8,0x1F,0x07,0xE0,0x0F,0x0F,0xC0,0x0E,0x1F,0x80,
0x00,0x1F,0x00,0x00,0x1F,0x00,0x00,0x3F,0x3F,0xC0,0x3F,0xFF,0xF8,0x3F,0xFF,0xFC,
0x3F,0x80,0x7E,0x3E,0x00,0x1F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x1E,
0x00,0x0F,0x1F,0x00,0x1E,0x0F,0xC0,0x7E,0x07,0xFF,0xFC,0x03,0xFF,0xF8,0x00,0x7F,
0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"6",6*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x38,0x00,0x00,0x3F,0xFF,0x9E,0x3F,
0xFF,0xFF,0x3F,0xFF,0xFE,0x3C,0x00,0xFC,0x3C,0x00,0x7C,0x3C,0x00,0xF8,0x3C,0x01,
0xF0,0x3C,0x03,0xE0,0x00,0x03,0xC0,0x00,0x07,0xC0,0x00,0x0F,0x80,0x00,0x0F,0x00,
0x00,0x1E,0x00,0x00,0x3E,0x00,0x00,0x3C,0x00,0x00,0x7C,0x00,0x00,0x7C,0x00,0x00,
0x78,0x00,0x00,0x78,0x00,0x00,0xF8,0x00,0x00,0xF8,0x00,0x00,0xF8,0x00,0x00,0x78,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"7",7*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xC0,0x03,
0xFF,0xF0,0x0F,0xFF,0xFC,0x0F,0x80,0x7C,0x1F,0x00,0x3E,0x1E,0x00,0x1E,0x1E,0x00,
0x1E,0x1E,0x00,0x1E,0x0F,0x00,0x3C,0x0F,0x80,0x7C,0x03,0xFF,0xF0,0x07,0xFF,0xF8,
0x0F,0xFF,0xFC,0x1F,0x80,0x7E,0x3E,0x00,0x1F,0x3C,0x00,0x0F,0x3C,0x00,0x0F,0x3C,
0x00,0x0F,0x3E,0x00,0x1F,0x1F,0x80,0x7E,0x0F,0xFF,0xFC,0x07,0xFF,0xF8,0x00,0xFF,
0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"8",8*/

0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x80,0x03,
0xFF,0xF0,0x07,0xFF,0xF8,0x0F,0x80,0xF8,0x0F,0x00,0x7C,0x1E,0x00,0x3C,0x1E,0x00,
0x3E,0x1E,0x00,0x1E,0x1E,0x00,0x1E,0x1E,0x00,0x1E,0x1F,0x00,0x3E,0x0F,0x80,0xFE,
0x07,0xFF,0xFE,0x03,0xFF,0xFE,0x00,0x7F,0x9E,0x00,0x00,0x3C,0x00,0x00,0x3C,0x1E,
0x00,0x7C,0x1E,0x00,0xF8,0x1F,0x03,0xF0,0x0F,0xFF,0xE0,0x07,0xFF,0xC0,0x01,0xFE,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,/*"9",9*/

};


